@zonos/elements 1.3.103 → 1.3.104

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/dist/cjs/{CheckoutConfig-090e2b05.js → CheckoutConfig-33c1075c.js} +1 -1
  2. package/dist/cjs/{cart-207f884e.js → cart-e04e756f.js} +1 -1
  3. package/dist/cjs/{createCustomEvent-16d055b8.js → createCustomEvent-3442779d.js} +2 -2
  4. package/dist/cjs/{handleFetch-b0bbc10b.js → handleFetch-aa729c61.js} +2 -1
  5. package/dist/cjs/index.cjs.js +9 -9
  6. package/dist/cjs/{paypal-8f5dccc8.js → paypal-9f73932e.js} +2 -2
  7. package/dist/cjs/zonos-address_7.cjs.entry.js +2 -2
  8. package/dist/cjs/zonos-cart-items_13.cjs.entry.js +4 -4
  9. package/dist/cjs/zonos-checkout.cjs.entry.js +5 -5
  10. package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
  11. package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
  12. package/dist/cjs/zonos-country-select_4.cjs.entry.js +2 -2
  13. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
  14. package/dist/cjs/zonos-hello.cjs.entry.js +2 -2
  15. package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
  16. package/dist/cjs/zonos-notification_3.cjs.entry.js +3 -3
  17. package/dist/collection/components/utils/logging/sendErrorLog.js +2 -1
  18. package/dist/esm/{CheckoutConfig-9cdb7beb.js → CheckoutConfig-690e8e05.js} +1 -1
  19. package/dist/esm/{cart-90943a07.js → cart-8deffb25.js} +1 -1
  20. package/dist/esm/{createCustomEvent-3ea6c7c5.js → createCustomEvent-eef7531d.js} +2 -2
  21. package/dist/esm/{handleFetch-41e3d2b2.js → handleFetch-3dea7d46.js} +2 -1
  22. package/dist/esm/index.js +10 -10
  23. package/dist/esm/{paypal-417c64a1.js → paypal-44d7ebfe.js} +2 -2
  24. package/dist/esm/zonos-address_7.entry.js +2 -2
  25. package/dist/esm/zonos-cart-items_13.entry.js +4 -4
  26. package/dist/esm/zonos-checkout.entry.js +5 -5
  27. package/dist/esm/zonos-controller.entry.js +2 -2
  28. package/dist/esm/zonos-country-flag.entry.js +2 -2
  29. package/dist/esm/zonos-country-select_4.entry.js +2 -2
  30. package/dist/esm/zonos-hello-dialog.entry.js +2 -2
  31. package/dist/esm/zonos-hello.entry.js +2 -2
  32. package/dist/esm/zonos-language-select_2.entry.js +2 -2
  33. package/dist/esm/zonos-notification_3.entry.js +3 -3
  34. package/dist/esm-es5/{CheckoutConfig-9cdb7beb.js → CheckoutConfig-690e8e05.js} +1 -1
  35. package/dist/esm-es5/{cart-90943a07.js → cart-8deffb25.js} +1 -1
  36. package/dist/esm-es5/{createCustomEvent-3ea6c7c5.js → createCustomEvent-eef7531d.js} +1 -1
  37. package/dist/esm-es5/{handleFetch-41e3d2b2.js → handleFetch-3dea7d46.js} +1 -1
  38. package/dist/esm-es5/index.js +1 -1
  39. package/dist/esm-es5/{paypal-417c64a1.js → paypal-44d7ebfe.js} +1 -1
  40. package/dist/esm-es5/zonos-address_7.entry.js +1 -1
  41. package/dist/esm-es5/zonos-cart-items_13.entry.js +1 -1
  42. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  43. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  44. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  45. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  46. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  47. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  48. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  49. package/dist/esm-es5/zonos-notification_3.entry.js +1 -1
  50. package/dist/scripts/index.js +1 -1
  51. package/dist/scripts/loadZonos.js +1 -1
  52. package/dist/scripts/zonos.js +1 -1
  53. package/dist/types/types/LogError.d.ts +1 -0
  54. package/dist/zonos-elements/index.esm.js +1 -1
  55. package/dist/zonos-elements/{p-0d42fb2f.entry.js → p-04a51a04.entry.js} +1 -1
  56. package/dist/zonos-elements/p-074e0cef.js +1 -0
  57. package/dist/zonos-elements/{p-a7b75673.system.entry.js → p-0d9d1b05.system.entry.js} +1 -1
  58. package/dist/zonos-elements/p-15c0e868.system.js +1 -0
  59. package/dist/zonos-elements/{p-574495ac.system.entry.js → p-377e09b5.system.entry.js} +1 -1
  60. package/dist/zonos-elements/{p-57de792d.system.entry.js → p-3f7b25c0.system.entry.js} +1 -1
  61. package/dist/zonos-elements/{p-27b6bbc2.system.js → p-43b3c2ae.system.js} +1 -1
  62. package/dist/zonos-elements/{p-e0da243f.entry.js → p-7248fa2a.entry.js} +1 -1
  63. package/dist/zonos-elements/{p-d0a6b588.js → p-7593ea46.js} +1 -1
  64. package/dist/zonos-elements/{p-61b1aa56.system.js → p-8698d30d.system.js} +1 -1
  65. package/dist/zonos-elements/{p-9209614f.system.entry.js → p-8f9f041b.system.entry.js} +1 -1
  66. package/dist/zonos-elements/{p-4e697c43.entry.js → p-91155a2e.entry.js} +1 -1
  67. package/dist/zonos-elements/{p-8de25afe.js → p-970fa103.js} +1 -1
  68. package/dist/zonos-elements/{p-55f68290.system.entry.js → p-99924ecf.system.entry.js} +1 -1
  69. package/dist/zonos-elements/{p-317066a3.system.entry.js → p-a749580b.system.entry.js} +1 -1
  70. package/dist/zonos-elements/{p-3f897fc1.system.entry.js → p-ace6b9b9.system.entry.js} +1 -1
  71. package/dist/zonos-elements/p-b325daa2.entry.js +1 -0
  72. package/dist/zonos-elements/{p-714241c8.entry.js → p-b9fb03b4.entry.js} +1 -1
  73. package/dist/zonos-elements/{p-591cf960.js → p-baf90f15.js} +1 -1
  74. package/dist/zonos-elements/{p-4813b1f8.entry.js → p-c36477c1.entry.js} +1 -1
  75. package/dist/zonos-elements/p-c78dd680.system.js +1 -1
  76. package/dist/zonos-elements/p-d3743479.entry.js +1 -0
  77. package/dist/zonos-elements/{p-6772ace5.entry.js → p-d38ec4aa.entry.js} +1 -1
  78. package/dist/zonos-elements/{p-fcd593bd.entry.js → p-d7bcfc30.entry.js} +1 -1
  79. package/dist/zonos-elements/{p-105e5a07.system.entry.js → p-da96d02c.system.entry.js} +1 -1
  80. package/dist/zonos-elements/{p-7dfc395b.js → p-db0a8873.js} +1 -1
  81. package/dist/zonos-elements/{p-21f04cb8.system.js → p-e38e84bd.system.js} +1 -1
  82. package/dist/zonos-elements/{p-32ff2c95.system.js → p-e56d52d1.system.js} +1 -1
  83. package/dist/zonos-elements/{p-a017dfc8.system.entry.js → p-e5972566.system.entry.js} +1 -1
  84. package/dist/zonos-elements/{p-e9614eb2.entry.js → p-fbb8b3ef.entry.js} +1 -1
  85. package/dist/zonos-elements/{p-3b19daa3.system.entry.js → p-fc7fcdb2.system.entry.js} +1 -1
  86. package/dist/zonos-elements/{p-598cfc03.system.js → p-ffd09491.system.js} +1 -1
  87. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  88. package/package.json +1 -1
  89. package/dist/zonos-elements/p-1fc16bee.system.js +0 -1
  90. package/dist/zonos-elements/p-cc652908.js +0 -1
  91. package/dist/zonos-elements/p-d4e524de.entry.js +0 -1
  92. package/dist/zonos-elements/p-da2183ab.entry.js +0 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const handleFetch = require('./handleFetch-b0bbc10b.js');
3
+ const handleFetch = require('./handleFetch-aa729c61.js');
4
4
 
5
5
  const getTempCartById = async (cartId) => {
6
6
  const urlParams = new URLSearchParams(window.location.search);
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const zonosStore = require('./zonosStore-b18fe6b6.js');
4
- const handleFetch = require('./handleFetch-b0bbc10b.js');
4
+ const handleFetch = require('./handleFetch-aa729c61.js');
5
5
  const isDarkColor = require('./isDarkColor-87ee1eb7.js');
6
6
  const getBorderRadius = require('./getBorderRadius-53c35cd1.js');
7
7
 
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- const cart = require('./cart-207f884e.js');
3
+ const cart = require('./cart-e04e756f.js');
4
4
  const zonosStore = require('./zonosStore-b18fe6b6.js');
5
- const handleFetch = require('./handleFetch-b0bbc10b.js');
5
+ const handleFetch = require('./handleFetch-aa729c61.js');
6
6
 
7
7
  const trackConversionEvent = async (eventName, metadata) => {
8
8
  var _a, _b;
@@ -140,7 +140,8 @@ const sendErrorLog = async ({ endpoint, errors, metadata, shouldPostReleaseError
140
140
  const errorObject = {
141
141
  endpoint,
142
142
  errors,
143
- metadata: Object.assign({ href: window.location.href, userAgent: userAgentData && userAgentData.brands.length > 0
143
+ href: window.location.href,
144
+ metadata: Object.assign({ userAgent: userAgentData && userAgentData.brands.length > 0
144
145
  ? userAgentData
145
146
  : window.navigator.userAgent }, metadata),
146
147
  };
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const handleFetch = require('./handleFetch-b0bbc10b.js');
6
- const CheckoutConfig = require('./CheckoutConfig-090e2b05.js');
5
+ const handleFetch = require('./handleFetch-aa729c61.js');
6
+ const CheckoutConfig = require('./CheckoutConfig-33c1075c.js');
7
7
 
8
8
  /**
9
9
  * Get the load version and url based on the loadScriptSrc and version
@@ -97,7 +97,7 @@ const getZonosQaUrl = () => {
97
97
  return null;
98
98
  }
99
99
  const qaUrl = extractZonosQaUrl(window.location.href);
100
- const cdnUrl = "https://v1.3.103.js.zonos.com";
100
+ const cdnUrl = "https://v1.3.104.js.zonos.com";
101
101
  // when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
102
102
  if (!qaUrl &&
103
103
  (cdnUrl.includes('test.') ||
@@ -281,10 +281,10 @@ const zonosLoadUrl = (() => {
281
281
  }
282
282
  return null;
283
283
  })();
284
- const ZONOS_URL = "https://v1.3.103.js.zonos.com";
285
- const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.103";
286
- const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.103";
287
- const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.103";
284
+ const ZONOS_URL = "https://v1.3.104.js.zonos.com";
285
+ const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.104";
286
+ const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.104";
287
+ const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.104";
288
288
  const INTER_FONT_URL = 'https://rsms.me';
289
289
  const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
290
290
  const INTER_FONT_REGEX = /^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;
@@ -299,7 +299,7 @@ Zonos.zonosConversionTest = typeof window !== 'undefined' &&
299
299
  !!window.location.search.match(/\?.*(&*)zonosConversionTest/);
300
300
  Zonos._paypalMockResponse = null;
301
301
  Zonos.isBigCommerce = false;
302
- Zonos.releaseDate = "1729277584379";
302
+ Zonos.releaseDate = "1729619578165";
303
303
  Zonos.isLegacyCheckout = false;
304
304
  Zonos.showBaseForeign = typeof window !== 'undefined' &&
305
305
  window.location.search.includes('zonosShowBaseForeign');
@@ -309,7 +309,7 @@ Zonos.showBaseForeign = typeof window !== 'undefined' &&
309
309
  Zonos.isNpm = true;
310
310
  Zonos.zonosQaUrl = null;
311
311
  Zonos.zonosQaUrlApi = null;
312
- Zonos.version = `v${"1.3.103"}`;
312
+ Zonos.version = `v${"1.3.104"}`;
313
313
  Zonos.modeAlerted = false;
314
314
  Zonos.cartData = null;
315
315
  Zonos.paypal = null;
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  const zonosStore = require('./zonosStore-b18fe6b6.js');
4
- const cart = require('./cart-207f884e.js');
5
- const handleFetch = require('./handleFetch-b0bbc10b.js');
4
+ const cart = require('./cart-e04e756f.js');
5
+ const handleFetch = require('./handleFetch-aa729c61.js');
6
6
  const isDarkColor = require('./isDarkColor-87ee1eb7.js');
7
7
 
8
8
  /*!
@@ -3,9 +3,9 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-d56e0a8b.js');
6
- const cart = require('./cart-207f884e.js');
6
+ const cart = require('./cart-e04e756f.js');
7
7
  const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
8
- const handleFetch = require('./handleFetch-b0bbc10b.js');
8
+ const handleFetch = require('./handleFetch-aa729c61.js');
9
9
  const containsNonLatinChars = require('./containsNonLatinChars-2be5129b.js');
10
10
  const zonosStore = require('./zonosStore-b18fe6b6.js');
11
11
  const classes = require('./classes-b7918f56.js');
@@ -3,13 +3,13 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-d56e0a8b.js');
6
- const cart = require('./cart-207f884e.js');
6
+ const cart = require('./cart-e04e756f.js');
7
7
  const classes = require('./classes-b7918f56.js');
8
- const paypal = require('./paypal-8f5dccc8.js');
8
+ const paypal = require('./paypal-9f73932e.js');
9
9
  const zonosStore = require('./zonosStore-b18fe6b6.js');
10
- const createCustomEvent = require('./createCustomEvent-16d055b8.js');
10
+ const createCustomEvent = require('./createCustomEvent-3442779d.js');
11
11
  const getBorderRadius = require('./getBorderRadius-53c35cd1.js');
12
- const handleFetch = require('./handleFetch-b0bbc10b.js');
12
+ const handleFetch = require('./handleFetch-aa729c61.js');
13
13
  const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
14
14
  const ILanguage = require('./ILanguage-98b04442.js');
15
15
  const isDarkColor = require('./isDarkColor-87ee1eb7.js');
@@ -3,16 +3,16 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-d56e0a8b.js');
6
- const cart = require('./cart-207f884e.js');
7
- const paypal = require('./paypal-8f5dccc8.js');
6
+ const cart = require('./cart-e04e756f.js');
7
+ const paypal = require('./paypal-9f73932e.js');
8
8
  const zonosStore = require('./zonosStore-b18fe6b6.js');
9
- const handleFetch = require('./handleFetch-b0bbc10b.js');
10
- const createCustomEvent = require('./createCustomEvent-16d055b8.js');
9
+ const handleFetch = require('./handleFetch-aa729c61.js');
10
+ const createCustomEvent = require('./createCustomEvent-3442779d.js');
11
11
  const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
12
12
  const classes = require('./classes-b7918f56.js');
13
13
  const getBorderRadius = require('./getBorderRadius-53c35cd1.js');
14
14
  const isDarkColor = require('./isDarkColor-87ee1eb7.js');
15
- const CheckoutConfig = require('./CheckoutConfig-090e2b05.js');
15
+ const CheckoutConfig = require('./CheckoutConfig-33c1075c.js');
16
16
  const RemoveIcon = require('./RemoveIcon-081ac073.js');
17
17
 
18
18
  /**
@@ -3,9 +3,9 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-d56e0a8b.js');
6
- const cart = require('./cart-207f884e.js');
6
+ const cart = require('./cart-e04e756f.js');
7
7
  const zonosStore = require('./zonosStore-b18fe6b6.js');
8
- const handleFetch = require('./handleFetch-b0bbc10b.js');
8
+ const handleFetch = require('./handleFetch-aa729c61.js');
9
9
  require('./isDarkColor-87ee1eb7.js');
10
10
  require('./getBorderRadius-53c35cd1.js');
11
11
 
@@ -3,10 +3,10 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-d56e0a8b.js');
6
- const cart = require('./cart-207f884e.js');
6
+ const cart = require('./cart-e04e756f.js');
7
7
  const zonosStore = require('./zonosStore-b18fe6b6.js');
8
8
  const classes = require('./classes-b7918f56.js');
9
- require('./handleFetch-b0bbc10b.js');
9
+ require('./handleFetch-aa729c61.js');
10
10
  require('./isDarkColor-87ee1eb7.js');
11
11
  require('./getBorderRadius-53c35cd1.js');
12
12
 
@@ -3,12 +3,12 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-d56e0a8b.js');
6
- const cart = require('./cart-207f884e.js');
6
+ const cart = require('./cart-e04e756f.js');
7
7
  const zonosStore = require('./zonosStore-b18fe6b6.js');
8
8
  const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
9
9
  const isDarkColor = require('./isDarkColor-87ee1eb7.js');
10
10
  const ILanguage = require('./ILanguage-98b04442.js');
11
- require('./handleFetch-b0bbc10b.js');
11
+ require('./handleFetch-aa729c61.js');
12
12
  require('./getBorderRadius-53c35cd1.js');
13
13
 
14
14
  /**
@@ -3,12 +3,12 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-d56e0a8b.js');
6
- const cart = require('./cart-207f884e.js');
6
+ const cart = require('./cart-e04e756f.js');
7
7
  const zonosStore = require('./zonosStore-b18fe6b6.js');
8
8
  const classes = require('./classes-b7918f56.js');
9
9
  const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
10
10
  const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
11
- require('./handleFetch-b0bbc10b.js');
11
+ require('./handleFetch-aa729c61.js');
12
12
  require('./isDarkColor-87ee1eb7.js');
13
13
  require('./getBorderRadius-53c35cd1.js');
14
14
 
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-d56e0a8b.js');
6
6
  const zonosStore = require('./zonosStore-b18fe6b6.js');
7
- const cart = require('./cart-207f884e.js');
7
+ const cart = require('./cart-e04e756f.js');
8
8
  const classes = require('./classes-b7918f56.js');
9
- const handleFetch = require('./handleFetch-b0bbc10b.js');
9
+ const handleFetch = require('./handleFetch-aa729c61.js');
10
10
  const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
11
11
  require('./isDarkColor-87ee1eb7.js');
12
12
  require('./getBorderRadius-53c35cd1.js');
@@ -3,10 +3,10 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-d56e0a8b.js');
6
- const cart = require('./cart-207f884e.js');
6
+ const cart = require('./cart-e04e756f.js');
7
7
  const zonosStore = require('./zonosStore-b18fe6b6.js');
8
8
  const ILanguage = require('./ILanguage-98b04442.js');
9
- require('./handleFetch-b0bbc10b.js');
9
+ require('./handleFetch-aa729c61.js');
10
10
  require('./isDarkColor-87ee1eb7.js');
11
11
  require('./getBorderRadius-53c35cd1.js');
12
12
 
@@ -5,9 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-d56e0a8b.js');
6
6
  const zonosStore = require('./zonosStore-b18fe6b6.js');
7
7
  const classes = require('./classes-b7918f56.js');
8
- const cart = require('./cart-207f884e.js');
9
- const handleFetch = require('./handleFetch-b0bbc10b.js');
10
- const paypal = require('./paypal-8f5dccc8.js');
8
+ const cart = require('./cart-e04e756f.js');
9
+ const handleFetch = require('./handleFetch-aa729c61.js');
10
+ const paypal = require('./paypal-9f73932e.js');
11
11
  require('./isDarkColor-87ee1eb7.js');
12
12
  require('./getBorderRadius-53c35cd1.js');
13
13
 
@@ -22,7 +22,8 @@ export const sendErrorLog = async ({ endpoint, errors, metadata, shouldPostRelea
22
22
  const errorObject = {
23
23
  endpoint,
24
24
  errors,
25
- metadata: Object.assign({ href: window.location.href, userAgent: userAgentData && userAgentData.brands.length > 0
25
+ href: window.location.href,
26
+ metadata: Object.assign({ userAgent: userAgentData && userAgentData.brands.length > 0
26
27
  ? userAgentData
27
28
  : window.navigator.userAgent }, metadata),
28
29
  };
@@ -1,4 +1,4 @@
1
- import { h as handleFetch, l as log, a as logError } from './handleFetch-41e3d2b2.js';
1
+ import { h as handleFetch, l as log, a as logError } from './handleFetch-3dea7d46.js';
2
2
 
3
3
  const getTempCartById = async (cartId) => {
4
4
  const urlParams = new URLSearchParams(window.location.search);
@@ -1,5 +1,5 @@
1
1
  import { c as createStore, z as zonosStore } from './zonosStore-7798ac16.js';
2
- import { h as handleFetch, a as logError, l as log, f as fallbackApiList, j as jsonParse } from './handleFetch-41e3d2b2.js';
2
+ import { h as handleFetch, a as logError, l as log, f as fallbackApiList, j as jsonParse } from './handleFetch-3dea7d46.js';
3
3
  import { i as isDarkColor } from './isDarkColor-4261bc3c.js';
4
4
  import { g as getBorderRadius } from './getBorderRadius-e55a9df1.js';
5
5
 
@@ -1,6 +1,6 @@
1
- import { d as cartStore, l as localizationStore } from './cart-90943a07.js';
1
+ import { d as cartStore, l as localizationStore } from './cart-8deffb25.js';
2
2
  import { z as zonosStore } from './zonosStore-7798ac16.js';
3
- import { h as handleFetch } from './handleFetch-41e3d2b2.js';
3
+ import { h as handleFetch } from './handleFetch-3dea7d46.js';
4
4
 
5
5
  const trackConversionEvent = async (eventName, metadata) => {
6
6
  var _a, _b;
@@ -138,7 +138,8 @@ const sendErrorLog = async ({ endpoint, errors, metadata, shouldPostReleaseError
138
138
  const errorObject = {
139
139
  endpoint,
140
140
  errors,
141
- metadata: Object.assign({ href: window.location.href, userAgent: userAgentData && userAgentData.brands.length > 0
141
+ href: window.location.href,
142
+ metadata: Object.assign({ userAgent: userAgentData && userAgentData.brands.length > 0
142
143
  ? userAgentData
143
144
  : window.navigator.userAgent }, metadata),
144
145
  };
package/dist/esm/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { l as log, a as logError } from './handleFetch-41e3d2b2.js';
2
- import { s as setupCartData, c as checkoutHiddenBtnSelector } from './CheckoutConfig-9cdb7beb.js';
3
- export { c as checkoutHiddenBtnSelector, d as domesticRedirectedBtnSelector } from './CheckoutConfig-9cdb7beb.js';
1
+ import { l as log, a as logError } from './handleFetch-3dea7d46.js';
2
+ import { s as setupCartData, c as checkoutHiddenBtnSelector } from './CheckoutConfig-690e8e05.js';
3
+ export { c as checkoutHiddenBtnSelector, d as domesticRedirectedBtnSelector } from './CheckoutConfig-690e8e05.js';
4
4
 
5
5
  /**
6
6
  * Get the load version and url based on the loadScriptSrc and version
@@ -94,7 +94,7 @@ const getZonosQaUrl = () => {
94
94
  return null;
95
95
  }
96
96
  const qaUrl = extractZonosQaUrl(window.location.href);
97
- const cdnUrl = "https://v1.3.103.js.zonos.com";
97
+ const cdnUrl = "https://v1.3.104.js.zonos.com";
98
98
  // when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
99
99
  if (!qaUrl &&
100
100
  (cdnUrl.includes('test.') ||
@@ -278,10 +278,10 @@ const zonosLoadUrl = (() => {
278
278
  }
279
279
  return null;
280
280
  })();
281
- const ZONOS_URL = "https://v1.3.103.js.zonos.com";
282
- const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.103";
283
- const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.103";
284
- const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.103";
281
+ const ZONOS_URL = "https://v1.3.104.js.zonos.com";
282
+ const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.104";
283
+ const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.104";
284
+ const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.104";
285
285
  const INTER_FONT_URL = 'https://rsms.me';
286
286
  const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
287
287
  const INTER_FONT_REGEX = /^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;
@@ -296,7 +296,7 @@ Zonos.zonosConversionTest = typeof window !== 'undefined' &&
296
296
  !!window.location.search.match(/\?.*(&*)zonosConversionTest/);
297
297
  Zonos._paypalMockResponse = null;
298
298
  Zonos.isBigCommerce = false;
299
- Zonos.releaseDate = "1729277584379";
299
+ Zonos.releaseDate = "1729619578165";
300
300
  Zonos.isLegacyCheckout = false;
301
301
  Zonos.showBaseForeign = typeof window !== 'undefined' &&
302
302
  window.location.search.includes('zonosShowBaseForeign');
@@ -306,7 +306,7 @@ Zonos.showBaseForeign = typeof window !== 'undefined' &&
306
306
  Zonos.isNpm = true;
307
307
  Zonos.zonosQaUrl = null;
308
308
  Zonos.zonosQaUrlApi = null;
309
- Zonos.version = `v${"1.3.103"}`;
309
+ Zonos.version = `v${"1.3.104"}`;
310
310
  Zonos.modeAlerted = false;
311
311
  Zonos.cartData = null;
312
312
  Zonos.paypal = null;
@@ -1,6 +1,6 @@
1
1
  import { z as zonosStore, c as createStore } from './zonosStore-7798ac16.js';
2
- import { d as cartStore, u as stripeStoreHandleInventoryCheck, t as translate, r as cartStoreNextStep, h as cartStoreClearCheckoutInterval } from './cart-90943a07.js';
3
- import { h as handleFetch, l as log, a as logError, j as jsonParse } from './handleFetch-41e3d2b2.js';
2
+ import { d as cartStore, u as stripeStoreHandleInventoryCheck, t as translate, r as cartStoreNextStep, h as cartStoreClearCheckoutInterval } from './cart-8deffb25.js';
3
+ import { h as handleFetch, l as log, a as logError, j as jsonParse } from './handleFetch-3dea7d46.js';
4
4
  import { t as tinycolor } from './isDarkColor-4261bc3c.js';
5
5
 
6
6
  /*!
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, d as getElement } from './index-86b8247e.js';
2
- import { j as stripeStore, P as getFallbackDefaultCountryCode, l as localizationStore, t as translate } from './cart-90943a07.js';
2
+ import { j as stripeStore, P as getFallbackDefaultCountryCode, l as localizationStore, t as translate } from './cart-8deffb25.js';
3
3
  import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
4
- import { a as logError, l as log } from './handleFetch-41e3d2b2.js';
4
+ import { a as logError, l as log } from './handleFetch-3dea7d46.js';
5
5
  import { i as isTextContainsNonLatinChars, c as containsNonLatinChars } from './containsNonLatinChars-2d8810c3.js';
6
6
  import { z as zonosStore, d as zonosStoreFontFamily } from './zonosStore-7798ac16.js';
7
7
  import { c as classes } from './classes-0d95c529.js';
@@ -1,11 +1,11 @@
1
1
  import { r as registerInstance, a as getAssetPath, h, H as Host, F as Fragment, c as createEvent, d as getElement } from './index-86b8247e.js';
2
- import { d as cartStore, E as currencyFormat, t as translate, F as cartStoreHasOneEligibleItem, G as stripeStoreApplyPromoCode, H as stripeStoreRemovePromoCode, w as stripeStoreReset, j as stripeStore, I as stripeStoreRetrievePayment, J as stripeStoreMessageBasedOnStatus, K as stripeStoreResetPromoCode, l as localizationStore, L as stripeStoreTranslateAddressToLatin, M as cartStoreUpdateSelectedShippingOption, N as cartStoreGetShippingTransitInfo, O as sortServiceLevelOptionsByAmount } from './cart-90943a07.js';
2
+ import { d as cartStore, E as currencyFormat, t as translate, F as cartStoreHasOneEligibleItem, G as stripeStoreApplyPromoCode, H as stripeStoreRemovePromoCode, w as stripeStoreReset, j as stripeStore, I as stripeStoreRetrievePayment, J as stripeStoreMessageBasedOnStatus, K as stripeStoreResetPromoCode, l as localizationStore, L as stripeStoreTranslateAddressToLatin, M as cartStoreUpdateSelectedShippingOption, N as cartStoreGetShippingTransitInfo, O as sortServiceLevelOptionsByAmount } from './cart-8deffb25.js';
3
3
  import { c as classes } from './classes-0d95c529.js';
4
- import { s as submitGtag, a as paypalStore, b as paypalStoreReset, i as isContrastColor } from './paypal-417c64a1.js';
4
+ import { s as submitGtag, a as paypalStore, b as paypalStoreReset, i as isContrastColor } from './paypal-44d7ebfe.js';
5
5
  import { z as zonosStore, g as getZonosStoreTheme, d as zonosStoreFontFamily } from './zonosStore-7798ac16.js';
6
- import { t as trackConversionEvent, c as createCustomEvent, g as getIsTestMode } from './createCustomEvent-3ea6c7c5.js';
6
+ import { t as trackConversionEvent, c as createCustomEvent, g as getIsTestMode } from './createCustomEvent-eef7531d.js';
7
7
  import { g as getBorderRadius } from './getBorderRadius-e55a9df1.js';
8
- import { h as handleFetch, s as sendErrorLog } from './handleFetch-41e3d2b2.js';
8
+ import { h as handleFetch, s as sendErrorLog } from './handleFetch-3dea7d46.js';
9
9
  import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
10
10
  import { l as languages } from './ILanguage-cd6acb72.js';
11
11
  import { i as isDarkColor, t as tinycolor } from './isDarkColor-4261bc3c.js';
@@ -1,14 +1,14 @@
1
1
  import { r as registerInstance, h, H as Host, F as Fragment } from './index-86b8247e.js';
2
- import { l as localizationStore, s as stripeStoreGetDomesticShippingSession, a as localizationStoreUpdateSelectedCountryCode, b as stripeStoreCleanupDomesticShippingSession, c as stripeStoreSaveDomesticShippingSession, i as initStripeElements, d as cartStore, e as cartStoreUpdateItems, f as cartStoreReset, g as cartStoreResetTabItems, h as cartStoreClearCheckoutInterval, j as stripeStore, k as stripeStoreInitCheckoutSession, m as cartStoreStartCheckoutInterval, n as cartStoreUpdateToErrorState, t as translate, o as getZCountryUrlParam, p as cartStoreSetCheckoutSession, q as stripeStorePrefetchLandedCost, r as cartStoreNextStep, u as stripeStoreHandleInventoryCheck, v as stripeStoreConfirmPayment, w as stripeStoreReset, x as localizationStoreOnUpdate } from './cart-90943a07.js';
3
- import { s as submitGtag, p as paypalInitScript } from './paypal-417c64a1.js';
2
+ import { l as localizationStore, s as stripeStoreGetDomesticShippingSession, a as localizationStoreUpdateSelectedCountryCode, b as stripeStoreCleanupDomesticShippingSession, c as stripeStoreSaveDomesticShippingSession, i as initStripeElements, d as cartStore, e as cartStoreUpdateItems, f as cartStoreReset, g as cartStoreResetTabItems, h as cartStoreClearCheckoutInterval, j as stripeStore, k as stripeStoreInitCheckoutSession, m as cartStoreStartCheckoutInterval, n as cartStoreUpdateToErrorState, t as translate, o as getZCountryUrlParam, p as cartStoreSetCheckoutSession, q as stripeStorePrefetchLandedCost, r as cartStoreNextStep, u as stripeStoreHandleInventoryCheck, v as stripeStoreConfirmPayment, w as stripeStoreReset, x as localizationStoreOnUpdate } from './cart-8deffb25.js';
3
+ import { s as submitGtag, p as paypalInitScript } from './paypal-44d7ebfe.js';
4
4
  import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-7798ac16.js';
5
- import { h as handleFetch, l as log, a as logError, s as sendErrorLog, g as getElapsedTime, b as allLogs } from './handleFetch-41e3d2b2.js';
6
- import { t as trackConversionEvent, c as createCustomEvent, g as getIsTestMode } from './createCustomEvent-3ea6c7c5.js';
5
+ import { h as handleFetch, l as log, a as logError, s as sendErrorLog, g as getElapsedTime, b as allLogs } from './handleFetch-3dea7d46.js';
6
+ import { t as trackConversionEvent, c as createCustomEvent, g as getIsTestMode } from './createCustomEvent-eef7531d.js';
7
7
  import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
8
8
  import { c as classes } from './classes-0d95c529.js';
9
9
  import { g as getBorderRadius } from './getBorderRadius-e55a9df1.js';
10
10
  import { i as isDarkColor } from './isDarkColor-4261bc3c.js';
11
- import { s as setupCartData, d as domesticRedirectedBtnSelector, c as checkoutHiddenBtnSelector } from './CheckoutConfig-9cdb7beb.js';
11
+ import { s as setupCartData, d as domesticRedirectedBtnSelector, c as checkoutHiddenBtnSelector } from './CheckoutConfig-690e8e05.js';
12
12
  import { R as RemoveIcon } from './RemoveIcon-9dc5dd1a.js';
13
13
 
14
14
  /**
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host } from './index-86b8247e.js';
2
- import { y as isValidSelector, j as stripeStore, z as initLocalizationStore, d as cartStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-90943a07.js';
2
+ import { y as isValidSelector, j as stripeStore, z as initLocalizationStore, d as cartStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-8deffb25.js';
3
3
  import { z as zonosStore, b as zonosStoreInitSetting, d as zonosStoreFontFamily } from './zonosStore-7798ac16.js';
4
- import { h as handleFetch, a as logError, l as log } from './handleFetch-41e3d2b2.js';
4
+ import { h as handleFetch, a as logError, l as log } from './handleFetch-3dea7d46.js';
5
5
  import './isDarkColor-4261bc3c.js';
6
6
  import './getBorderRadius-e55a9df1.js';
7
7
 
@@ -1,8 +1,8 @@
1
1
  import { r as registerInstance, h, H as Host, d as getElement } from './index-86b8247e.js';
2
- import { l as localizationStore } from './cart-90943a07.js';
2
+ import { l as localizationStore } from './cart-8deffb25.js';
3
3
  import { d as zonosStoreFontFamily } from './zonosStore-7798ac16.js';
4
4
  import { c as classes } from './classes-0d95c529.js';
5
- import './handleFetch-41e3d2b2.js';
5
+ import './handleFetch-3dea7d46.js';
6
6
  import './isDarkColor-4261bc3c.js';
7
7
  import './getBorderRadius-e55a9df1.js';
8
8
 
@@ -1,10 +1,10 @@
1
1
  import { r as registerInstance, h, H as Host, d as getElement } from './index-86b8247e.js';
2
- import { a as localizationStoreUpdateSelectedCountryCode, t as translate, l as localizationStore } from './cart-90943a07.js';
2
+ import { a as localizationStoreUpdateSelectedCountryCode, t as translate, l as localizationStore } from './cart-8deffb25.js';
3
3
  import { d as zonosStoreFontFamily } from './zonosStore-7798ac16.js';
4
4
  import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
5
5
  import { i as isDarkColor } from './isDarkColor-4261bc3c.js';
6
6
  import { l as languages } from './ILanguage-cd6acb72.js';
7
- import './handleFetch-41e3d2b2.js';
7
+ import './handleFetch-3dea7d46.js';
8
8
  import './getBorderRadius-e55a9df1.js';
9
9
 
10
10
  /**
@@ -1,10 +1,10 @@
1
1
  import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host } from './index-86b8247e.js';
2
- import { t as translate, l as localizationStore, E as currencyFormat } from './cart-90943a07.js';
2
+ import { t as translate, l as localizationStore, E as currencyFormat } from './cart-8deffb25.js';
3
3
  import { z as zonosStore } from './zonosStore-7798ac16.js';
4
4
  import { c as classes } from './classes-0d95c529.js';
5
5
  import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
6
6
  import { g as getHasMoreSpaceOnRight } from './getHasMoreSpaceOnRight-70eb913a.js';
7
- import './handleFetch-41e3d2b2.js';
7
+ import './handleFetch-3dea7d46.js';
8
8
  import './isDarkColor-4261bc3c.js';
9
9
  import './getBorderRadius-e55a9df1.js';
10
10
 
@@ -1,8 +1,8 @@
1
1
  import { r as registerInstance, h, H as Host } from './index-86b8247e.js';
2
2
  import { _ as _root, e as _baseGetTag, i as isObjectLike_1, f as isObject_1, z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-7798ac16.js';
3
- import { l as localizationStore, y as isValidSelector, t as translate, o as getZCountryUrlParam, A as setZCountryUrlParam, B as currencyDisplay, C as currencyConvertAndFormat, D as currencyConvert, E as currencyFormat } from './cart-90943a07.js';
3
+ import { l as localizationStore, y as isValidSelector, t as translate, o as getZCountryUrlParam, A as setZCountryUrlParam, B as currencyDisplay, C as currencyConvertAndFormat, D as currencyConvert, E as currencyFormat } from './cart-8deffb25.js';
4
4
  import { c as classes } from './classes-0d95c529.js';
5
- import { h as handleFetch, a as logError, l as log } from './handleFetch-41e3d2b2.js';
5
+ import { h as handleFetch, a as logError, l as log } from './handleFetch-3dea7d46.js';
6
6
  import { g as getHasMoreSpaceOnRight } from './getHasMoreSpaceOnRight-70eb913a.js';
7
7
  import './isDarkColor-4261bc3c.js';
8
8
  import './getBorderRadius-e55a9df1.js';
@@ -1,8 +1,8 @@
1
1
  import { r as registerInstance, h, H as Host } from './index-86b8247e.js';
2
- import { Q as localizationStoreUpdateSelectedLocale, t as translate, l as localizationStore } from './cart-90943a07.js';
2
+ import { Q as localizationStoreUpdateSelectedLocale, t as translate, l as localizationStore } from './cart-8deffb25.js';
3
3
  import { d as zonosStoreFontFamily } from './zonosStore-7798ac16.js';
4
4
  import { l as languages } from './ILanguage-cd6acb72.js';
5
- import './handleFetch-41e3d2b2.js';
5
+ import './handleFetch-3dea7d46.js';
6
6
  import './isDarkColor-4261bc3c.js';
7
7
  import './getBorderRadius-e55a9df1.js';
8
8
 
@@ -1,9 +1,9 @@
1
1
  import { r as registerInstance, h, H as Host, d as getElement, c as createEvent } from './index-86b8247e.js';
2
2
  import { d as zonosStoreFontFamily } from './zonosStore-7798ac16.js';
3
3
  import { c as classes } from './classes-0d95c529.js';
4
- import { j as stripeStore } from './cart-90943a07.js';
5
- import { a as logError, l as log } from './handleFetch-41e3d2b2.js';
6
- import { c as paypalStoreInitButtons } from './paypal-417c64a1.js';
4
+ import { j as stripeStore } from './cart-8deffb25.js';
5
+ import { a as logError, l as log } from './handleFetch-3dea7d46.js';
6
+ import { c as paypalStoreInitButtons } from './paypal-44d7ebfe.js';
7
7
  import './isDarkColor-4261bc3c.js';
8
8
  import './getBorderRadius-e55a9df1.js';
9
9
 
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,n,r){function o(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,a){function i(t){try{u(r.next(t))}catch(t){a(t)}}function c(t){try{u(r["throw"](t))}catch(t){a(t)}}function u(t){t.done?n(t.value):o(t.value).then(i,c)}u((r=r.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,o,a,i;return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return u([t,e])}}function u(c){if(r)throw new TypeError("Generator is already executing.");while(i&&(i=0,c[0]&&(n=0)),n)try{if(r=1,o&&(a=c[0]&2?o["return"]:c[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,c[1])).done)return a;if(o=0,a)c=[c[0]&2,a.value];switch(c[0]){case 0:case 1:a=c;break;case 4:n.label++;return{value:c[1],done:false};case 5:n.label++;o=c[1];c=[0];continue;case 7:c=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){n.label=c[1];break}if(c[0]===6&&n.label<a[1]){n.label=a[1];a=c;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(c);break}if(a[2])n.ops.pop();n.trys.pop();continue}c=e.call(t,n)}catch(t){c=[6,t];o=0}finally{r=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};import{h as handleFetch,l as log,a as logError}from"./handleFetch-41e3d2b2.js";var getTempCartById=function(t){return __awaiter(void 0,void 0,void 0,(function(){var e,n,r,o,a;return __generator(this,(function(i){switch(i.label){case 0:e=new URLSearchParams(window.location.search);n=e.get("zonosTestMode")==="1";return[4,handleFetch("/api/zonos-elements/get-temp-cart",{body:{isTestMode:n,tempCartUUID:t},headers:{"Content-Type":"application/json"},method:"POST"})];case 1:r=i.sent(),o=r.errors,a=r.json;if(!a||o.length){return[2,null]}return[2,a]}}))}))};var setupCartData=function(t){return __awaiter(void 0,void 0,void 0,(function(){var e;return __generator(this,(function(n){switch(n.label){case 0:return[4,getTempCartById(t)];case 1:e=n.sent();log("[ZONOS - loadZonos] getting temp cart data","info",e);if(!e){logError("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process.");return[2,null]}return[2,{cartData:e.cartData,storeFavicon:e.storeFaviconUrl,storeId:e.cartData.storeId,storeLogo:e.storeLogoUrl,zonosApiKey:e.cartData.credentialToken}]}}))}))};var checkoutHiddenBtnSelector="zonos--checkout-hidden-button";var domesticRedirectedBtnSelector="zonos--domestic-redirected-checkout-button";export{checkoutHiddenBtnSelector as c,domesticRedirectedBtnSelector as d,setupCartData as s};
1
+ var __awaiter=this&&this.__awaiter||function(t,e,n,r){function o(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,a){function i(t){try{u(r.next(t))}catch(t){a(t)}}function c(t){try{u(r["throw"](t))}catch(t){a(t)}}function u(t){t.done?n(t.value):o(t.value).then(i,c)}u((r=r.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,o,a,i;return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return u([t,e])}}function u(c){if(r)throw new TypeError("Generator is already executing.");while(i&&(i=0,c[0]&&(n=0)),n)try{if(r=1,o&&(a=c[0]&2?o["return"]:c[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,c[1])).done)return a;if(o=0,a)c=[c[0]&2,a.value];switch(c[0]){case 0:case 1:a=c;break;case 4:n.label++;return{value:c[1],done:false};case 5:n.label++;o=c[1];c=[0];continue;case 7:c=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){n.label=c[1];break}if(c[0]===6&&n.label<a[1]){n.label=a[1];a=c;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(c);break}if(a[2])n.ops.pop();n.trys.pop();continue}c=e.call(t,n)}catch(t){c=[6,t];o=0}finally{r=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};import{h as handleFetch,l as log,a as logError}from"./handleFetch-3dea7d46.js";var getTempCartById=function(t){return __awaiter(void 0,void 0,void 0,(function(){var e,n,r,o,a;return __generator(this,(function(i){switch(i.label){case 0:e=new URLSearchParams(window.location.search);n=e.get("zonosTestMode")==="1";return[4,handleFetch("/api/zonos-elements/get-temp-cart",{body:{isTestMode:n,tempCartUUID:t},headers:{"Content-Type":"application/json"},method:"POST"})];case 1:r=i.sent(),o=r.errors,a=r.json;if(!a||o.length){return[2,null]}return[2,a]}}))}))};var setupCartData=function(t){return __awaiter(void 0,void 0,void 0,(function(){var e;return __generator(this,(function(n){switch(n.label){case 0:return[4,getTempCartById(t)];case 1:e=n.sent();log("[ZONOS - loadZonos] getting temp cart data","info",e);if(!e){logError("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process.");return[2,null]}return[2,{cartData:e.cartData,storeFavicon:e.storeFaviconUrl,storeId:e.cartData.storeId,storeLogo:e.storeLogoUrl,zonosApiKey:e.cartData.credentialToken}]}}))}))};var checkoutHiddenBtnSelector="zonos--checkout-hidden-button";var domesticRedirectedBtnSelector="zonos--domestic-redirected-checkout-button";export{checkoutHiddenBtnSelector as c,domesticRedirectedBtnSelector as d,setupCartData as s};